package ch.jherzig.algorithmen_5;

public class Main_Algorithmen_5 {

	private static EingabeAlgorithmen_5 frame;

	public static void main(String[] args) {
		System.err.println("Main_Suchen wurde gestartet");

		frame = new EingabeAlgorithmen_5();
		frame.setVisible(true);

		int[] f = { 7, 4, 5, 6, 2, 8, 1, 11, 22, 3 };
		String sort = "";
		System.out.println("Start insertSort");
		for (int i = 0; i < f.length; i++) {
			sort = sort + f[i] + ";";
		}
		System.out.println(sort);
		sort = "";

		Sort s = new Sort();
		s.insertionSort(f);

		for (int i = 0; i < f.length; i++) {
			sort = sort + f[i] + ";";
		}
		System.out.println(sort);

		String sortSelection = "";
		int[] f2 = { 7, 4, 5, 6, 2, 8, 1, 11, 22, 3 };
		Sort selection = new Sort();
		selection.selectionSort(f2);

		for (int i = 0; i < f2.length; i++) {
			sortSelection = sortSelection + f2[i] + ";";
		}
		System.out.println("sortSelection: " + sortSelection);
		
		
		String bubbelSort = "";
		int[] f3 = { 7, 4, 5, 6, 2, 8, 1, 11, 22, 3 };
		Sort bubbelSort1 = new Sort();
		bubbelSort1.bubbleSort(f3);

		for (int i = 0; i < f3.length; i++) {
			bubbelSort = bubbelSort + f3[i] + ";";
		}
		System.out.println("bubbelSort: " + bubbelSort);
		
		
		String merge = "";
		int[] f4 = {5,1,8,3,9,2};
		Sort mergeSort = new Sort();
		mergeSort.mergeSort(f4);

		for (int i = 0; i < f4.length; i++) {
			merge = merge + f4[i] + ";";
		}
		System.out.println("mergeSort: " + merge);
		
		
		String quick = "";
		int[] f5 = {5,1,8,3,9,2};
		Sort quickSort = new Sort();
		quickSort.quickSort(f5);

		for (int i = 0; i < f5.length; i++) {
			quick = quick + f5[i] + ";";
		}
		System.out.println("quickSort: " + quick);

	}

}
